package alipay.openplatform.edu.campus.jiuye.dao.mappers.topic;

import alipay.openplatform.edu.campus.jiuye.model.po.TopicSchoolInfoPO;
import alipay.openplatform.edu.campus.jiuye.model.po.TopicSchoolInfoKeyPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TopicSchoolInfoMapper {
    int deleteByPrimaryKey(TopicSchoolInfoKeyPO key);

    int insert(List<TopicSchoolInfoPO> topicSchoolInfoPOs);

    int insertSelective(TopicSchoolInfoPO record);

    int updateByPrimaryKeySelective(TopicSchoolInfoPO record);

    int updateByPrimaryKey(List<TopicSchoolInfoPO> topicSchoolInfoPOs);

    void deleteByTopicId(Integer topicId);
    /**
     * 根据学校id查询学校信息
     *
     * @param schoolId 学校id
     * @param cityId  城市id
     * @return
     */
    List<TopicSchoolInfoPO> queryByschoolId(@Param("schoolId") String schoolId,@Param("cityId") String cityId);

    List<TopicSchoolInfoPO> selectByTopicId(Integer topicId);

    /**
     * 同过主题ID,学校ID,城市ID查询TopicSchoolInfoPO
     * @param topicId
     * @param schoolId
     * @param cityId
     * @return
     */
    TopicSchoolInfoPO selectSchoolInfoByTopicIdAndSchoolId(@Param("topicId") Integer topicId,@Param("schoolId") String schoolId,@Param("cityId") String cityId);
}